package com.handydata.antifraud.dao.impl;

import com.handydata.antifraud.dao.RiskRuleDictlinfoBasedataDao;
import com.handydata.antifraud.entity.RiskRuleDictIinfoDao;
import com.handydata.common.dao.AbsBaseDao;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 报警规则定义表Dao接口
 * 
 * @author guolong
 * @email jishu@handy-data.cn
 * @date 2019-08-18 20:57:31
 */
@Repository
public class RiskRuleDictlinfoBasedataDaoImpl extends AbsBaseDao<RiskRuleDictIinfoDao> implements RiskRuleDictlinfoBasedataDao {

    @Override
    public List<Map<String, String>> queryOrderList() {
        return sqlSession.selectList(this.namespace.concat(".queryRiskRuleDictList"));
    }

    @Override
    public List<RiskRuleDictIinfoDao> queryRiskRuleDictALL() {
        return sqlSession.selectList(this.namespace.concat(".queryRiskRuleDictALL"));
    }

    @Override
    public List<RiskRuleDictIinfoDao> queryALL() {
        return sqlSession.selectList(this.namespace.concat(".queryALL"));
    }

    @Override
    public RiskRuleDictIinfoDao queryRiskRuleDictOne(String packageName) {
        return sqlSession.selectOne(this.namespace.concat(".queryOneRiskRule"), packageName);
    }

    @Override
    public int updateRiskRuleDictInfo(RiskRuleDictIinfoDao riskRuleDictIinfoDao) {
        return sqlSession.update(this.namespace.concat(".update"), riskRuleDictIinfoDao);
    }
}
